<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改学生信息管理')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-student-edit">
        <h4 class="form-header h4">基本资料</h4>
        <div class="row">
            <div class="col-sm-5">
                <img class="center-block" th:src="(${#strings.isEmpty(user.avatar)}) ? @{img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='http://localhost:8080/img/profile.jpg'"  style="width: 70%;">
            </div>
            <div class="col-sm-7">
                <div class="form-group">
                    <label class="col-sm-3 control-label">学生学号：</label>
                    <div class="form-control-static" th:text="${sad.studentNumber}">
                    </div>
                </div>
            </div>
            <div class="col-sm-7">
                <div class="form-group">
                    <label class="col-sm-3 control-label">姓名：</label>
                    <div class="form-control-static" th:text="${sad.studentName}">
                    </div>
                </div>
            </div>
            <div class="col-sm-7">
                <div class="form-group">
                    <label class="col-sm-3 control-label">类型：</label>
                    <div class="form-control-static" th:text="${sad.studentType}">
                    </div>
                </div>
            </div>
            <div class="col-sm-7">
                <div class="form-group">
                    <label class="col-sm-3 control-label">性别：</label>
                    <div class="form-control-static" th:text="${sad.gender}">
                    </div>
                </div>
            </div>
            <div class="col-sm-7">
                <div class="form-group">
                    <label class="col-sm-3 control-label">入学时间：</label>
                    <div class="form-control-static" th:text="${#dates.format(sad.admissionsTime, 'yyyy-MM-dd')}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">学院：</label>
                    <div class="form-control-static" th:text="${sad.collegeName}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">专业：</label>
                    <div class="form-control-static" th:text="${sad.majorName}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">班级：</label>
                    <div class="form-control-static" th:text="${sad.className}">
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">成绩信息</h4>
        <div class="row">
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">补考数：</label>
                    <div class="form-control-static" th:text="${sad.bkCount}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">重修数：</label>
                    <div class="form-control-static" th:text="${sad.cxCount}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">挂科数：</label>
                    <div class="form-control-static" th:text="${sad.gkCount}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">平均学分绩点：</label>
                    <div class="form-control-static" th:text="${sad.avgCreditGradePoint}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">总学分：</label>
                    <div class="form-control-static" th:text="${sad.totalCredit}">
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-7 control-label">平均成绩：</label>
                    <div class="form-control-static" th:text="${sad.avgGrade}">
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">教师评语</h4>
        <div class="form-group">
            <div class="col-sm-8">
                <div class="form-control-static" th:text="${sad.remark}">
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    var prefix = ctx + "gas/student";
    $("#form-student-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-student-edit').serialize());
        }
    }
</script>
</body>
</html>